package orgcxmzxy.xyj;

public class example01 {
    public static void main(String[] args){
        Student student = new Student();
        student.name = "李四";
        student.age = 18;
        System.out.println("我叫"+student.name+"，今年"+student.age+"岁，热爱学习");
        System.out.println("我可执行如下方法：");
        student.eat();
        student.sleep();
        student.study();

        Teacher teacher = new Teacher();
        teacher.name = "黎明";
        teacher.age = 25;
        teacher.salary= 6000;
        System.out.println("老师名叫"+teacher.name+"，今年"+teacher.age+"，月薪是"+teacher.salary);
        System.out.println("我可执行如下方法：");
        teacher.eat();
        teacher.sleep();
        teacher.teach();
    }
}
